﻿using System;
using UnityEngine;
using UnityEngine.UI;

namespace Studio
{
	// Token: 0x02000558 RID: 1368
	public class UI_HideMenuAnimation : MonoBehaviour
	{
		// Token: 0x060022ED RID: 8941 RVA: 0x000D3A14 File Offset: 0x000D1C14
		private void OnEnable()
		{
			this.StateSet();
		}

		// Token: 0x060022EE RID: 8942 RVA: 0x000D3A1C File Offset: 0x000D1C1C
		public void StateSet()
		{
			if (null == this.anm)
			{
				return;
			}
			this.state = ((!this.toggle) ? 1 : ((!this.toggle.isOn) ? 0 : 1));
			this.anm.Play((this.state != 0) ? "IdleOpen" : "IdleClose");
			if (null != this.text)
			{
				this.text.text = ((this.state != 1) ? "▼" : "▲");
			}
		}

		// Token: 0x060022EF RID: 8943 RVA: 0x000D3ACC File Offset: 0x000D1CCC
		public void StateChange()
		{
			if (null == this.anm)
			{
				return;
			}
			this.state = ((!this.toggle) ? ((this.state != 0) ? 0 : 1) : ((!this.toggle.isOn) ? 0 : 1));
			this.anm.Play((this.state != 0) ? "Open" : "Close");
			if (null != this.text)
			{
				this.text.text = ((this.state != 1) ? "▼" : "▲");
			}
		}

		// Token: 0x040023FD RID: 9213
		public Animator anm;

		// Token: 0x040023FE RID: 9214
		public Text text;

		// Token: 0x040023FF RID: 9215
		public Toggle toggle;

		// Token: 0x04002400 RID: 9216
		private int state = 1;
	}
}
